<?php



namespace App\Http\Requests\Backend;




use App\Http\Requests\Company\BaseRequest;
use Illuminate\Support\Facades\Auth;

class CompanyRoleRequest extends BaseRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'title' => 'required',
            'privileges' => 'required',

        ];
    }

    public function messages()
    {
        return [
            'title.required' => __('请输入版本'),
            'description.required' => __('请输入简单描述'),
            'privileges.required' => __('请输入版本权限'),

        ];
    }

    public function filldata()
    {
        $user= Auth::user();
        return [
            'title' =>(string) $this->input('title'),
            'description' => (string)$this->input('description'),
            'privileges' => (array)$this->input('privileges', []),
            'expireds' => (array)$this->input('expireds', []),
        ];
    }
}
